package com.jcl.core.constants;

import java.util.HashMap;
import java.util.Map;

/**
 * @ClassName ChannelSource
 * @Author yyliu
 * @Date 2018/9/25 16:35
 * @Version 1.0
 **/
public class CrawlerConstant {

    // 下载中
    public static final Integer TASK_STATUS_0 = 0;
    // 下载成功
    public static final Integer TASK_STATUS_1 = 1;
    // 下载点数不够失败
    public static final Integer TASK_STATUS_2 = 2;
    // 账户密码有误
    public static final Integer TASK_STATUS_3 = 3;

    public static final String CODE_DOWN_SUCCESS = "1000";
    // 下载点数不够
    public static final String CODE_DOWN_BUY_DIT = "1001";
    //账户密码有误
    public static final String CODE_ERROR_ACCOUNT = "1002";

    public static final String CODE_SUCCESS_MSG = "简历下载成功!";
    public static final String CODE_BUY_DIT_MSG = "简历下载失败，下载点数不够!";
    public static final String CODE_ERROR_ACCOUNT_MSG = "简历下载失败，账户密码有误!";

    public static final Map<String, String> codeMsg = new HashMap<>();
    public static final Map<String, Integer> codeStatus = new HashMap<>();

    static {
        codeMsg.put(CODE_DOWN_SUCCESS, CODE_SUCCESS_MSG);
        codeMsg.put(CODE_DOWN_BUY_DIT, CODE_BUY_DIT_MSG);
        codeMsg.put(CODE_ERROR_ACCOUNT, CODE_ERROR_ACCOUNT_MSG);

        codeStatus.put(CODE_DOWN_SUCCESS, TASK_STATUS_1);
        codeStatus.put(CODE_DOWN_BUY_DIT, TASK_STATUS_2);
        codeStatus.put(CODE_ERROR_ACCOUNT, TASK_STATUS_3);
    }


}
